<%@ page language="java" import="java.util.Calendar;" %>
<%@ page errorPage="error.jsp?source=creacionEvento.jsp"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<%

 double lttd=0;
 double lngt=0;

 String j= request.getParameter("juego");
	
%>
<html>
 <head>
  <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
  <title>English Chicken</title>
  <link type='text/css' href='css/creacionUsuario.css' rel='stylesheet' media='all'>
  <script type="text/javascript" src="js/ajax.js"></script>
  <script type="text/javascript" src="js/creacionEvento.js"></script>
  <script type="text/javascript" src="http://maps.google.com/maps?file=api&amp;v=2&amp;key=ABQIAAAAG_EsipFAO3axUrlzBL54yBSES8lTjYXFoBn5xLctGYLEpAD2OBSBQIjzeyNIDc1gO06RLY5wfh7h-g"></script>
  <script type="text/javascript">
  var nuevaLatitud=<%=lttd%>;
  var nuevaLongitud=<%=lngt%>;
   function initialize(){
    if(GBrowserIsCompatible()){
     var map=new GMap2(document.getElementById("map_canvas"));
     map.setCenter(new GLatLng(0,0),1);
     map.addControl(new GLargeMapControl());
     map.addControl(new GMapTypeControl());
     <%
     out.println("localiza( "+lttd+","+lngt+", 1, map)");
     %>
    }
   }
  </script>  
 </head>
 <body onload="initialize()" onunload="GUnload()">
  <div id="gen_cont">
   <hr />
    
    Nombre: <input type="text" name="nombre" id="nombre">
    <br />
        
    Fecha de Inicio: 
    <% 
     Calendar today = Calendar.getInstance(); 
     %>
     <select name="diaC" id="diaC">
     <%
     for(int dia=1;dia<32;dia++)
     {
    	 if(dia<10)
    	 {
       		out.println("<option> 0" + dia + "</option>");     
   		 
   		 }
   		 else
   		 {
   			 out.println("<option>" + dia + "</option>");     
   		 }
   	 
    }
    %>
    </select>
     
    <select name="mesC" id="mesC" >
     <%
     for(int m=1; m<13;m++)
     {
    	 if(m<10)
    	 {
    		out.println("<option> 0"+m+"</option>");
    	 }
    	 else
    	 {
    	 	out.println("<option>"+m+"</option>");
    	 }
     }
    	 
     %>
   	 </select>
   	    	  
    <select name="yearC" id="yearC">
    
    <% 	   
    int year = today.get(Calendar.YEAR);
    for(int i=year;i<year+5;i++)
    {
    	out.println("<option>"+i+"</option>");    
    }
    %>
    </select><br />
   
    Fecha de Finalizaci&oacute;n: 
    
     <select name="diaF" id="diaF">
     <%
     for(int dia=1;dia<32;dia++)
     {
    	 if(dia<10)
    	 {
    		out.println("<option> 0" + dia + "</option>");     
   		 
   		 }
    	 else
    	 {
    		 out.println("<option>" + dia + "</option>");     
   		 }
   	 
    }
    %>
    </select>
     
    <select name="mesF" id="mesF" >
     <%
     for(int m=1; m<13;m++)
     {
    	 if(m<10)
    	 {
    		 out.println("<option> 0"+m+"</option>");
    	 }
    	 else
    	 {
    	 	 out.println("<option>"+m+"</option>");
    	 }
     }
    	 
     %>
   	 </select>
   	    	  
    <select name="yearF" id="yearF">
    
    <% 	   
    for(int i=year;i<year+5;i++)
    {
    	out.println("<option>"+i+"</option>");    
    }
    %>
    </select><br />

    <div id="map_canvas"></div>
    
    <input type="button" value="Crear Evento" onclick="enviar('<%=j%>')"> <input type="reset" value="Cancelar" onclick="restablecer()">
    <br />
    
	</div> 
</body>
</html>